const { app, BrowserWindow } = require('electron')

function createWindow() {
    const win = new BrowserWindow({
        width: 800,
        height: 600,
        show: false,
        // frame: true,
        // autoHideMenuBar: true,
        title: "Samve",
        // icon: "",
        webPreferences: {
            nodeIntegration: true,
            contextIsolation: false,
            enableRemoteModule: true
        }
    })

    require('@electron/remote/main').initialize()
    require("@electron/remote/main").enable(win.webContents)

    win.loadFile('index.html')

    win.on("ready-to-show", function(){
        win.show();
    })
}

app.on("ready", function(){
    createWindow();
})

app.on("window-all-closed", function(){
    app.quit();
})

